<%@page import="com.training.java.redbox.domain.Movie"%>
<%@page import="com.training.java.redbox.domain.Customer" %>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Checkout</title>
</head>
<body>

	<%@include file="Header.jsp"%> <br/>
	
<c:if test="${Customer!=null}">
	<font color= "black" >Welcome</font>
	<font color= "navy">
		<c:out value="${Customer.firstName}  ${Customer.lastName}"></c:out>
	</font><br>
<a href="/redbox/logout"><img src="images/logout.jpg" width="90" height="40"></a>

</c:if>


<hr>

	<center>Following are the movies you added to the cart.</center> <br/><br/>

	<center><table bordercolor="blue" border="1">
		<tr>
			<th>Title</th>
			<th>Type</th>
			<th>Price</th>
		</tr>
		<c:forEach items="${MoviesCart}" var ="movie">
			<tr>
				<td><c:out value="${movie.title}"></c:out></td>
				<td><c:out value="${movie.type }"></c:out></td>
				<td><c:out value="${movie.rentalPrice}"></c:out></td>
			</tr>
		</c:forEach>

	</table>
	
	<form action="/redbox/finalCheckout" method="post" >
	<br><input type="submit" value="Submit Order">
	</form></center>
	
	
	
	<%@include file="Footer.jsp"%>

</body>
</html>